//
//  HomeSearchView.swift
//  TianTianBiTing
//
//  Created by Gox mac 2 on 2018/12/19.
//  Copyright © 2018 Gox_WallyDiao. All rights reserved.
//

import UIKit

class HomeSearchView: UIView {
    var searchTitle: UILabel = {
        let label = UILabel.init(frame: FRAME_CGFloat(SCREEN_WIDTH_CUT20 / 2 - 18, 8, SCREEN_WIDTH_CUT20 / 2, 14))
        label.font = FONT(13)
        label.textColor = RGB_Same(178)
        label.text = ""
        return label
    }()

    override init(frame: CGRect) {
        super.init(frame: frame)
        
        setUI()
    }
    
    required init?(coder aDecoder: NSCoder) {
        fatalError("init(coder:) has not been implemented")
    }
    
    func setUI() {
        let backView = UIView.init(frame: FRAME_CGFloat(10, 0, SCREEN_WIDTH_CUT20, 30))
        backView.backgroundColor = RGB_Same(243)
        backView.layer.cornerRadius = 10
        self.addSubview(backView)
        
        let serchImage = UIImageView.init(frame: FRAME_CGFloat(SCREEN_WIDTH_CUT20 / 2 - 32, 8, 12, 14))
        serchImage.image = IMAGE(name: "home_search")
        backView.addSubview(serchImage)
        
        backView.addSubview(self.searchTitle)
        
    }
    
    func setTitle(title: String) {
        self.searchTitle.text = title
    }
    
}


